“Please imagine a ladder, with steps numbered from 0 at the bottom to 10 at the top. The top of the ladder represents the best possible life for you and the bottom of the ladder represents the worst possible life for you. On which step of the ladder would you say you personally feel you stand at this time?”
## # A tibble: 423 × 4
## Country Code Year Happiness
## <chr> <chr> <dbl> <dbl>
## 1 Albania ALB 1998 33.4
## 2 Albania ALB 2004 58.8
## 3 Albania ALB 2010 66.9
## 4 Albania ALB 2022 73.9
## 5 Algeria DZA 2004 80.7
## 6 Algeria DZA 2014 75.5
## 7 Andorra AND 2010 92.5
## 8 Andorra AND 2022 95.0
## 9 Argentina ARG 1984 77.0
## 10 Argentina ARG 1993 76.3
## # ℹ 413 more rows
The following chart demonstrates that it is possible to approximate
the functionality of our World in Data grapher for multicountry
selection using R, specifically with the crosstalk package
and a small amount of custom JavaScript. For more information on how to
achieve this, see this
Stack Overflow question.
Note that this is not a required task, but rather a showcase of what can be achieved. The code for this will be shared when we provide the solutions for the exercise.
Data source: World Happiness Report